package top.tangyh.lamp.care.mapper;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import top.tangyh.basic.base.mapper.SuperMapper;
import top.tangyh.lamp.care.entity.BHl7YzPacsResult;
import org.springframework.stereotype.Repository;
import top.tangyh.lamp.care.vo.query.YzPacsResultQueryVO;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 检查结果表
 * </p>
 *
 * @author zqb
 * @date 2024-08-02 16:39:32
 * @create [2024-08-02 16:39:32] [zqb] [代码生成器生成]
 */
@Repository
public interface BHl7YzPacsResultMapper extends SuperMapper<BHl7YzPacsResult> {

    default List<BHl7YzPacsResult> selectListByQuery(YzPacsResultQueryVO queryVO) {
        String patientIdent = queryVO.getPatientIdent();
        String hospitalNumber = queryVO.getHospitalNumber();
        String applyId = queryVO.getApplyId();
        LambdaQueryWrapper<BHl7YzPacsResult> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(StrUtil.isNotBlank(patientIdent), BHl7YzPacsResult::getPatientIdent, patientIdent)
                .eq(StrUtil.isNotBlank(hospitalNumber), BHl7YzPacsResult::getHospitalNumber, hospitalNumber)
                .eq(StrUtil.isNotBlank(applyId), BHl7YzPacsResult::getApplyId, applyId);
        return this.selectList(queryWrapper);
    }
    
    
}


